//
//  PixelViewController.m
//  allinone
//
//  Created by Johnil on 16/2/25.
//  Copyright © 2016年 Johnil. All rights reserved.
//

#import "PixelViewController.h"

//http://www.paintcodeapp.com/news/iphone-6-screens-demystified

@implementation PixelViewController

- (void)viewDidLoad{
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
    {
        UIView *line = [[UIView alloc] initWithFrame:CGRectMake(0, 100, self.view.width, .5)];
        line.backgroundColor = [UIColor blackColor];
        [self.view addSubview:line];
    }
    {
        UIView *line = [[UIView alloc] initWithFrame:CGRectMake(0, 105, self.view.width, 1.0/[UIScreen scale])];
        line.backgroundColor = [UIColor blackColor];
        [self.view addSubview:line];
    }
    {
        UIView *block = [[UIView alloc] initWithFrame:CGRectMake(10, 110, 30, 30)];
        block.backgroundColor = [UIColor whiteColor];
        block.layer.borderWidth = .5;
        block.layer.borderColor = [UIColor blackColor].CGColor;
        [self.view addSubview:block];
    }
    {
        UIView *block = [[UIView alloc] initWithFrame:CGRectMake(50, 110, 30, 30)];
        block.backgroundColor = [UIColor whiteColor];
        block.layer.borderWidth = 1.0/[UIScreen scale];
        block.layer.borderColor = [UIColor blackColor].CGColor;
        [self.view addSubview:block];
    }
}

@end
